/**
 * Copyright 2008 Hotye Inc.
 */
package craneding.gwt.databean.client.ui.field;

import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.PopupPanel;
import com.google.gwt.user.client.ui.Widget;

/**
 * 交易信息弹出框
 * 
 * @author crane.ding
 * @version 1.0 2008-12-2
 */
public class ValidationPopupPanel extends PopupPanel {

	private boolean isHide = true;
	
	public ValidationPopupPanel() {
		setStyleName("DataBean-ValidationPopupPanel");
	}

	public void show(Widget parent, String message) {
		int left = parent.getAbsoluteLeft() + parent.getOffsetWidth();
		int top = parent.getAbsoluteTop();
		setWidget(new Label(message));
		setPopupPosition(left, top);
		show();
	}

	@Override
	public void show() {
		super.show();
		isHide = false;
	}

	@Override
	public void hide() {
		super.hide();
		isHide = true;
	}

	public boolean isHide() {
		return isHide;
	}

}
